<template>
	<view class="orderDetails">
		<view class="line flex">
			<view class="label">订单编号：</view>
			<view class="val">
				{{ Info.order_sn }}
			</view>
			<view class="btn" @click="copy">复制</view>
		</view>
		<view class="line flex">
			<view class="label">下单时间：</view>
			<view class="val">
				{{ Info.create_time }}
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name: 'orderNumber',
		props: {
			Info: {
				type: Object,
				default: () => {},
			},
		},
		data() {
			return {};
		},
		methods:{
			copy() {
				uni.setClipboardData({
					data: this.Info.order_sn,
				});
			},
		}
	};
</script>

<style lang="scss" scoped>
	.orderDetails {
		width: $connet-width;
		margin: $submargin-width auto;
		background-color: $content-bg-colcor;
		font-size: $uni-font-size-12;
		color: $title-colcor;
		overflow: hidden;

		.line {
			margin: $margin-width;

			.btn {
				color: $price-color;
				margin-left: $submargin-width;
			}
		}
	}
</style>
